/******************************************************************** MenuWindow.h It is just the same like our Window.h we have used before, but we need some more. So I include here our Window.h... *********************************************************************/ #define PARENT #include "/includes/Window.h" /********************************************************************/ // saving for later some typing work - making again a nice define :-) #define GET_MENUID(a,b) ((USHORT)GTMENUITEM_USERDATA(ItemAddress(a->MenuStrip, b->Code))) enum // preparing some ID's { MENU_ID_PROJECT = 1, // it must start higher than "0" !! MENU_ID_SAVE, MENU_ID_QUIT, MENU_ID_NEXT_MENU, MENU_ID_ITEM }; // Now we must fill a MenuData structure // You may use for the flags also the standard Intuition or // GadTools menu flags... (to get checkable menus, ...) MenuData winmenu[] = { { NM_TITLE, // it's a menu title MENU_ID_PROJECT, // ID MSG_PROJECT, // ID code of the string to display 0 // no flags }, { NM_ITEM, // it's a item MENU_ID_SAVE, // ID code of the item MSG_SAVE, // ID of the string MENUFLAG_COMM_SEQ | // use (allow) the usage of a key combination with R-Amiga MENUFLAG_USE_SEQ | // but we want our own key MENUFLAG_MAKE_SEQ( 'W' ) // we want (here) the 'W' key (for example) }, { NM_ITEM, // item 0, // no ID - here is "0" allowed NM_BAR_LABEL, // a barlabel 0 }, { NM_ITEM, MENU_ID_QUIT, MSG_QUIT, MENUFLAG_COMM_SEQ // here we take now the key we'll get }, // but here it should be "Q" ... { NM_TITLE, // next menu title MENU_ID_NEXT_MENU, MSG_NEXT_MENU, 0 }, { NM_ITEM, // first entry of "Next Menu" MENU_ID_ITEM, MSG_ITEM, 0 }, { NM_END // Don't forget this... } }; // that's all... :-)